#pragma once

#include "CustomException.h"

CustomException::CustomException(ERROR_TYPE error, std::string message) {
	errorType = error;
	errorMessage = message;
}

std::string CustomException::getMessage() {
	return errorMessage;
}

ERROR_TYPE CustomException::getErrorType() {
	return errorType;
}

void CustomException::printMessage() {
	std::cout << getErrorLabel() << " " << getMessage();
}

std::string CustomException::getErrorLabel() {
	switch(errorType) {
		case SPA_PARSE_ERROR:
			return "SPA Parse Error";
		case PQL_PARSE_ERROR:
			return "PQL Parse Error";
		default:
			return "Exception";
	}
}